package com.mujin.keji.collectionsystem.utils.ImageLoader.base;

import android.content.Context;
import android.widget.ImageView;

/**
 * @author 作者：weishixiong
 * @date 创建时间：2018/5/2
 * @corporation 公司：mujin
 * @desception 加载图片的基础配置信息，如需更多自定义配置需继承该类
 */

public class BaseLoaderConfig {
    private Context context;
    private String imagePath;   //图片路径
    private ImageView imageView;
    private int cacheSize;     //配置的磁盘缓存大小，单位为M
    private int imgWidth;     //图片宽
    private int imgHeight;    //图片高
    private int placeHolder;  //占位图
    private int errorImg;     //错误图
    private OnLoadImageListener listener;  //加载图片回调
    
    
    public Context getContext() {
        return context;
    }
    
    public BaseLoaderConfig setContext(Context context) {
        this.context = context;
        return this;
    }
    
    public ImageView getImageView() {
        return imageView;
    }
    
    public BaseLoaderConfig setImageView(ImageView imageView) {
        this.imageView = imageView;
        return this;
    }
    
    public int getCacheSize() {
        return cacheSize;
    }
    
    public BaseLoaderConfig setCacheSize(int cacheSize) {
        this.cacheSize = cacheSize;
        return this;
    }
    
    public int getImgWidth() {
        return imgWidth;
    }
    
    public BaseLoaderConfig setImgWidth(int imgWidth) {
        this.imgWidth = imgWidth;
        return this;
    }
    
    public int getImgHeight() {
        return imgHeight;
    }
    
    public BaseLoaderConfig setImgHeight(int imgHeight) {
        this.imgHeight = imgHeight;
        return this;
    }
    
    public int getPlaceHolder() {
        return placeHolder;
    }
    
    public BaseLoaderConfig setPlaceHolder(int placeHolder) {
        this.placeHolder = placeHolder;
        return this;
    }
    
    public int getErrorImg() {
        return errorImg;
    }
    
    public BaseLoaderConfig setErrorImg(int errorImg) {
        this.errorImg = errorImg;
        return this;
    }
    
    public OnLoadImageListener getListener() {
        return listener;
    }
    
    public BaseLoaderConfig setListener(OnLoadImageListener listener) {
        this.listener = listener;
        return this;
    }
    
    public String getImagePath() {
        return imagePath;
    }
    
    public BaseLoaderConfig setImagePath(String imagePath) {
        this.imagePath = imagePath;
        return this;
    }
}
